package Hbase;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.util.Bytes;

import java.io.IOException;

/**
 * @author 曹一凡
 * @date 2021/11/3 16:40
 */
public class DeleteCellValue {
    public static void DElete(String row) throws IOException {
        Configuration conf = HBaseConfiguration.create();
        conf.set("hbase.zookeeper.quorum", "niit01");
        HTable table = new HTable(conf,"students");
        Delete del = new Delete(Bytes.toBytes(row));
        //del.deleteColumn(Bytes.toBytes("personal"),Bytes.toBytes("age"));
        table.delete(del);
    }
}
